<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:p="http://primefaces.org/ui"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <title>Share me now</title>

    </h:head>
    <h:body>

        <h:form>  
            <h:inputHidden id="shareID" 

                           value="#{shareController.selected.id}" 
                           />
<!--            <p:fieldset legend="Share" toggleable="true" toggleSpeed="500">  -->
                <p:fieldset legend="Share, #{myUserController.selected.firstName}" >
                    <h:panelGrid columns="2" cellpadding="10">  
                        <p:graphicImage value="/resources/images/shareMeNow.gif" />  

                        <h:panelGrid columns="2">





                            <h:outputLabel for="shareWhat" 
                                           value="Share What?" 
                                           styleClass="requiredLbl"/>
                            <p:inputText id="shareWhat" 
                                         label="Share What?*" 
                                         value="#{shareController.selected.name}" 
                                         required="true"/>

                            <h:outputLabel for="whatespecially" 
                                           value="What especially?" 
                                           styleClass="optionalLbl"/>
                            <p:inputText id="whatespecially" 
                                         label="What especially?" 
                                         value="#{shareController.selected.description}"
                                         />

                            <h:outputLabel for="when" 
                                           value="When?" 
                                           styleClass="requiredLbl"/>


                            <p:calendar id="when" 
                                        value="#{shareController.selected.startDate}" 
                                        showOn="button" 
                                        size="10"
                                        navigator="true" required="true"/>



                            <h:outputLabel for="where" 
                                           value="Where?" 
                                           styleClass="optionalLbl"/>
                            <p:inputText id="where" 
                                         label="Where?" 
                                         value="#{shareController.selected.place}"
                                         required="true"
                                         />

                            <h:outputLabel for="budget" 
                                           value="#{bundle.CreateShareLabel_budget}" 
                                           styleClass="optionalLbl"/>
                            <p:inputText id="budget" 
                                         label="Budget" 
                                         value="#{shareController.selected.budget}"
                                         title="#{bundle.CreateShareTitle_budget}"
                                         required="true"
                                         />



                            <h:outputLabel for="count" 
                                           value="Count" 
                                           styleClass="optionalLbl"/>
                            <p:inputText id="count" 
                                         label="Count" 
                                         value="#{shareController.selected.count}"

                                         />
                            <h:outputLabel for="spreadReward" 
                                           value='"Word spread" reward' 
                                           styleClass="optionalLbl"/>
                            <p:inputText id="spreadReward" 
                                         label='"Word spread" reward' 
                                         value="#{shareController.selected.reward}"
                                         required="true"
                                         />


                            <p:commandButton id="submitButton"
                                             value="Continue Inviting Friends" 
                                             action="#{shareController.create}"
                                             ajax="false"/>


                        </h:panelGrid>
                    </h:panelGrid>  
                </p:fieldset>  

        </h:form>
    </h:body>
</html>

